// Copyright 2022 a.o.smith ALL Rights Reserved
package com.liuxinlong.enums;

/**
 * 学习中心业务类型枚举
 *
 * @author liuxinlong@hotwater.com.cn
 * @version 1.0.0
 * @since 2022-12-06
 */
public enum ButlerBusinessTypeEnum {
    FAQ(1, "FAQ"),
    SPECIAL_INFORMATION(2, "专题资讯"),
    COMPANY_INFORMATION(3, "公司资讯"),
    COLUMN_ZONE(4, "专栏专区"),
    ONLINE_EDUCATION(5, "网上教育"),
    LEARNING_TOOLS(6, "学习工具"),
    LIBRARY(7, "图书室");

    private int value;

    private String name;

    ButlerBusinessTypeEnum(int value, String name) {
        this.value = value;
        this.name = name;
    }

    public int getValue() {
        return value;
    }

    public String getName() {
        return name;
    }

    public static String getNameByValue(int value) {
        ButlerBusinessTypeEnum arrObj[] = ButlerBusinessTypeEnum.values();
        for (ButlerBusinessTypeEnum obj : arrObj) {
            if (value == obj.getValue()) {
                return obj.getName();
            }
        }
        return " ";
    }

}
